# -*- coding=utf-8 -*-
import urllib.request

def download_demo():
    for i in range(1, 23, 1):
        url = 'http://newoss.maiziedu.com/yxyh4/pand-%02d.mp4' % i

        f = urllib.request.urlopen(url)
        data = f.read()
        name = 'python_pandas_%02d.mp4' % (i)

        with open(name, "wb") as code:
            code.write(data)

def download_evcard():
    print("start request url")
    url='http://122.228.238.156/vhot2.qqvideo.tc.qq.com/Ahkkmx_Ztsdr_B69FO5tnTJwke9QruKBT3fiQP8CqNCo/h1328uk0how.mp4?sdtfrom=v1000&type=mp4&vkey=A13E7987BF1A2A2A4C7D3A52A8477B36FE7483E68446AC8E796D46E696A56C18EA05B1B869A0D3680C8FC60295BEC7CF8B4B23BDD3B6C3EC0D47BC2EEB9DBB217C5A5545E5EF6CE04D22C13B792530171D8A65319B52A34380117BBFB9D94737800FCCA0DD888C291BA1463985A218EA1969001DFE25CE2E&level=0&platform=70202&br=60&fmt=hd&sp=0&guid=3E5FE693BD110E8A5D104909DCC3267C871215D8&locid=ff1f683b-34c0-45cc-8d75-d08c489af8e1&size=12167951&ocid=481629612'
    f=urllib.request.urlopen(url)
    data = f.read()
    print("start save video")
    name = 'python_evcard.mp4'
    with open(name, "wb") as code:
        code.write(data)
    print("success save video")

if __name__ =="__main__":
    download_evcard()